package com.vic.framework;

import java.util.Map;

import com.vic.framework.bean.Handle;
import com.vic.framework.bean.Request;
import com.vic.framework.helper.AopHelper;
import com.vic.framework.helper.BeanHelper;
import com.vic.framework.helper.ClassHelper;
import com.vic.framework.helper.Controllerhelper;
import com.vic.framework.helper.IocHelper;
import com.vic.framework.utils.ClassUtils;

/**
 * 加载相应的Helper类
 * @author VIC
 *
 */
public class HelperLoader {

	public static void init(){
		Class<?>[] classArr = {
				ClassHelper.class,
				BeanHelper.class,
				IocHelper.class,
				Controllerhelper.class,
				AopHelper.class
		};
		for(Class<?> cls : classArr) {
			ClassUtils.loadClass(cls.getName(), true);
		}
		
	}
	public static void main(String[] args) {
		HelperLoader.init();
		Controllerhelper c =new Controllerhelper();
		Map<Request, Handle> action_map = Controllerhelper.ACTION_MAP;
		System.out.println(action_map.size());
		for(Map.Entry<Request, Handle> entry : action_map.entrySet()) {
			System.out.println(entry.getKey());
			System.out.println(entry.getValue());
		}
	}

}
